package Engine.InputHandling;

import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

/**
 * Use the variable 'keysDown[]' to check pressed keys.
 * Example: if (Keyboard.keysDown[KeyEvent.VK_UP]) doSomething();
 * @author Lueko
 * 
 */
public class Keyboard implements KeyListener {
    
    public static boolean[] keysDown = new boolean[550];

    @Override
    public void keyPressed(KeyEvent e) {
        keysDown[e.getKeyCode()] = true;
    }

    @Override
    public void keyReleased(KeyEvent e) {
        keysDown[e.getKeyCode()] = false;
    }

    @Override
    public void keyTyped(KeyEvent e) {
    }
    
}
